//
//  MHToolUtils.h
//  MH
//
//  Created by SY on 2018/10/7.
//  Copyright © 2018年 SY. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#if __has_include("MHUserModel.h")
#define userModel
#import "MHUserModel.h"
#endif
@interface NSObject (Model)
/** 获取数据*/
+(id)getSqliteModel:(NSString *)where class:(Class)Class;
/** 保存数据*/
+(void)saveSqliteModel:(id)Model;
@end

@class MHAppDelegate,MHUserModel;
@interface MHToolUtils : NSObject
+(instancetype)shareTools;
+(MHAppDelegate *)getAppDelegate;
+(NSURL *)getImageUrl:(NSString *)imageUrl domain:(NSString *)domainStr;
/**用户的模型*/
+(void)saveUserModel:(MHUserModel *)userModel;
+(MHUserModel *)getSqliteUserModel:(NSString *)mobile;
+(MHUserModel *)getSqliteUserModelWhere:(NSString *)where;
+(MHUserModel *)getMemoryUserModel;
/** 上次有登录*/
+(MHUserModel *)isAlreadyLastLogin;
/** 最新登陆用户*/
+(MHUserModel *)getSqliteLatestTimeDate;
/** 判断是否新(包括更新)App第一次启动*/
+(BOOL)isNewVersinLaunchApp;
/** 判断第一次安装*/
+(BOOL)isNewFirstLaunchApp;
+ (NSString *)appName;
//获取拼音首字母(传入汉字字符串, 返回大写拼音首字母)
+ (NSString *)firstPinyinLetterOfString:(NSString *)aString;

//增加window
+ (UIWindow *)popOverWindow ;
+ (void)addViewToPopOverWindow:(UIView *)view;
+ (void)removeViewFromPopOverWindow:(UIView *)view;
@end
